package com.settlement.system.service.impl;

import com.settlement.system.mapper.TblMarketToolBillDetailMapper;
import com.settlement.system.common.exception.ServiceException;
import com.settlement.system.model.entity.common.TblMarketToolBillDetail;
import com.settlement.system.model.entity.common.TblRrRecordProjectMain;
import com.settlement.system.service.ITblMarketToolBillDetailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import com.settlement.system.mapper.BaseMapper;
import jakarta.annotation.Resource;
import java.util.List;

/**
 * 营销工具原始账单 服务实现类
 * @author xiaochuan
 * @since 2022-12-21
 */

@Slf4j
@Service
public class TblMarketToolBillDetailServiceImpl extends BaseServiceImpl implements ITblMarketToolBillDetailService {

    @Resource
    private TblMarketToolBillDetailMapper tblMarketToolBillDetailMapper;

    @Override
    public BaseMapper init() {
        return tblMarketToolBillDetailMapper;
    }


    @Override
    public List<TblMarketToolBillDetail> selectByParams(TblMarketToolBillDetail tblMarketToolBillDetail) throws ServiceException {
        try {
            return tblMarketToolBillDetailMapper.selectByParams(tblMarketToolBillDetail);
        } catch (Exception ex){
            log.error("selectByParams by tblRrRecordProjectMain happen exception",ex);
            throw new ServiceException("selectByParams by tblRrRecordProjectMain happen exception",ex);
        }
    }
}

